﻿<!DOCTYPE html>
<!-- saved from url=(0049)http://www.javamall.com.cn/version6/admin/main.do -->
<html class="panel-fit"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Javashop示例商城</title>

<meta http-equiv="X-UA-Compatible" content="IE=9">
<!-- <script type="text/javascript">
		var str={"颜色":[1,2,3]};
		for(var a in str){
			for(var b=0;b<str[a].length;b++){
					alert(str[a][b]);
			}
		}
</script> -->
<script>
	
		var data=[{"name":"规格参数","paramList":[{"name":"重量","value":""},{"name":"产品标准号","value":""},{"name":"生产日期","value":""},{"name":"保质期","value":""},{"name":"储存方法","value":""},{"name":"配料","value":""},{"name":"产地","value":""},{"name":"厂家","value":""}],"paramNum":8}];
		var str="<table>";
	for (var a in data){
		alert(data[a]);
		//拿到参数组名
		alert(data[a]["name"]);
		//遍历该参数组名下的参数
		for(var b in data[a]["paramList"]){
			//alert(data[a]["paramList"][b]["name"]+":"+data[a]["paramList"][b]["value"]);
			str+="<tr><td>"+data[a]["paramList"][b]["name"]+"</td><td><input type='text'/></td></tr>";
		}
		str+="</table>";
		alert(str);
		$("body").append(str);
	}
	
	/*
	var data={"颜色":["黄色","红色","蓝色"],"尺寸":["M","L","XL"]};
	for (var a in data){
		alert(data[a]);
	}*/
</script>
</head>
<body>									
</body>
</html>